# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename))
# You can write up to 5GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using "Save & Run All"
# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session
import pandas as pd
cw1 = pd.read_csv('https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv')
cw1
t_cw1 = cw1[['iso_code','location','date','total_cases']]
t_cw1[t_cw1['total_cases'].isna()]
cw1_ = t_cw1.dropna()
index = t_cw1[t_cw1['location'] == 'World'].index
cw1_.drop(index, inplace=True)
cw1_
cw1_.sort_values(['date'],axis =0, ascending=True, inplace=True)
cw1_
import plotly.express as px
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.OrRd,
scope ="world",
animation_frame ="date")
fig.show()
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.turbid,
scope ="asia",
animation_frame ="date")
fig.show()
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.Aggrnyl,
scope ="europe",
animation_frame ="date")
fig.show()
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.Burg,
scope ="north america",
animation_frame ="date")
fig.show()
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.dense,
scope ="south america",
animation_frame ="date")
fig.show()
fig = px.choropleth(cw1_,
locations ="iso_code",
color ="total_cases",
hover_name ="location",
color_continuous_scale = px.colors.sequential.Agsunset,
scope ="africa",
animation_frame ="date")
fig.show()